package com.dyzx.hbb.modules.wms.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;

/**
 * 产品主数据表，包含产品名称、规格、条码等
 * @TableName wms_product
 */
@TableName(value ="wms_product")
@Data
public class WmsProduct {
    /**
     * 编号
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 产品名称 (如：前刹车片，机油滤清器，火花塞 XYZ型号)。
     */
    private String name;

    /**
     * 类别 表示产品类别 (如：制动系统，发动机保养，电气部件)
     */
    private Long categoryId;

    /**
     * 内部物料代码/零件号 (如：ABC-123-456)
     */
    private String internalCode;

    /**
     * 状态 字典信息：sys_global_status
     */
    private Integer status;

    /**
     * 创建日期（毫秒级时间戳）
     */
    @TableField(fill= FieldFill.INSERT)
    private Long createDate;

    /**
     * 更新日期（毫秒级时间戳）
     */
    @TableField(fill= FieldFill.INSERT_UPDATE)
    private Long updateDate;

    /**
     * 删除标志
     */
    private Integer deleted;

    /**
     * 操作用户编号
     */
    private Long operatorId;

    /**
     * 企业编号
     */
    private Long organId;

    /**
     * 详细的产品描述、功能、技术特点
     */
    private String description;

    /**
     * (外键，可选): 指向Supplier表，记录主要供应商信息（如果重要）
     */
    private Long supplierId;

    /**
     * 计量单位 (如：个，套，升) 字典：wms_product_unit_of_measure
     */
    private String unitOfMeasure;

    /**
     * (可选): 重量
     */
    private Long weight;

    /**
     * (可选): 尺寸 (长x宽x高 或 单独字段)
     */
    private String dimensions;

    /**
     *  (可选): 产品图片的存储路径或URL
     */
    private String imageUrl;

    private String imageId;

    /**
     * 布尔值 (True/False)，标记该产品是否当前有效可用
     */
    private Integer isActive;

    /**
     * (可选): 标记该产品是否需要严格的质量追溯（与批号强相关）
     */
    private Integer qualityTraceFlag;

    /**
     * 符合的标准 (如：ISO 9001, SAE JXXXX)
     */
    private String standardCompliance;

    /**
     * 价格
     */
    private Long amt;

    /**
     * (可选): 毛重
     */
    private Long grossweight;

    /**
     * (可选): 净重
     */
    private Long netweight;

    /**
     * (可选): 宽度
     */
    private Long width;

    /**
     * (可选): 高度
     */
    private Long height;

    /**
     * (可选): 深度
     */
    private Long depth;

    /**
     * (可选): 原产国
     */
    private String origincountry;

    /**
     * (可选): 原产地
     */
    private String originplace;

    /**
     * (可选): 组装国
     */
    private String assemblycountry;

    /**
     * (可选): 生产厂家
     */
    private String company;

    /**
     * 英文名称
     */
    private String ename;

    /**
     * UNSPSC代码
     */
    private String unspsc;

    /**
     * 品牌
     */
    private String brand;

    /**
     * (可选): 净含量
     */
    private String netcontent;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        WmsProduct other = (WmsProduct) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
            && (this.getCategoryId() == null ? other.getCategoryId() == null : this.getCategoryId().equals(other.getCategoryId()))
            && (this.getInternalCode() == null ? other.getInternalCode() == null : this.getInternalCode().equals(other.getInternalCode()))
            && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
            && (this.getCreateDate() == null ? other.getCreateDate() == null : this.getCreateDate().equals(other.getCreateDate()))
            && (this.getUpdateDate() == null ? other.getUpdateDate() == null : this.getUpdateDate().equals(other.getUpdateDate()))
            && (this.getDeleted() == null ? other.getDeleted() == null : this.getDeleted().equals(other.getDeleted()))
            && (this.getOperatorId() == null ? other.getOperatorId() == null : this.getOperatorId().equals(other.getOperatorId()))
            && (this.getOrganId() == null ? other.getOrganId() == null : this.getOrganId().equals(other.getOrganId()))
            && (this.getDescription() == null ? other.getDescription() == null : this.getDescription().equals(other.getDescription()))
            && (this.getSupplierId() == null ? other.getSupplierId() == null : this.getSupplierId().equals(other.getSupplierId()))
            && (this.getUnitOfMeasure() == null ? other.getUnitOfMeasure() == null : this.getUnitOfMeasure().equals(other.getUnitOfMeasure()))
            && (this.getWeight() == null ? other.getWeight() == null : this.getWeight().equals(other.getWeight()))
            && (this.getDimensions() == null ? other.getDimensions() == null : this.getDimensions().equals(other.getDimensions()))
            && (this.getImageUrl() == null ? other.getImageUrl() == null : this.getImageUrl().equals(other.getImageUrl()))
                && (this.getImageId() == null ? other.getImageId() == null : this.getImageId().equals(other.getImageId()))
            && (this.getIsActive() == null ? other.getIsActive() == null : this.getIsActive().equals(other.getIsActive()))
            && (this.getQualityTraceFlag() == null ? other.getQualityTraceFlag() == null : this.getQualityTraceFlag().equals(other.getQualityTraceFlag()))
            && (this.getStandardCompliance() == null ? other.getStandardCompliance() == null : this.getStandardCompliance().equals(other.getStandardCompliance()))
            && (this.getAmt() == null ? other.getAmt() == null : this.getAmt().equals(other.getAmt()))
            && (this.getGrossweight() == null ? other.getGrossweight() == null : this.getGrossweight().equals(other.getGrossweight()))
            && (this.getNetweight() == null ? other.getNetweight() == null : this.getNetweight().equals(other.getNetweight()))
            && (this.getWidth() == null ? other.getWidth() == null : this.getWidth().equals(other.getWidth()))
            && (this.getHeight() == null ? other.getHeight() == null : this.getHeight().equals(other.getHeight()))
            && (this.getDepth() == null ? other.getDepth() == null : this.getDepth().equals(other.getDepth()))
            && (this.getOrigincountry() == null ? other.getOrigincountry() == null : this.getOrigincountry().equals(other.getOrigincountry()))
            && (this.getOriginplace() == null ? other.getOriginplace() == null : this.getOriginplace().equals(other.getOriginplace()))
            && (this.getAssemblycountry() == null ? other.getAssemblycountry() == null : this.getAssemblycountry().equals(other.getAssemblycountry()))
            && (this.getCompany() == null ? other.getCompany() == null : this.getCompany().equals(other.getCompany()))
            && (this.getEname() == null ? other.getEname() == null : this.getEname().equals(other.getEname()))
            && (this.getUnspsc() == null ? other.getUnspsc() == null : this.getUnspsc().equals(other.getUnspsc()))
            && (this.getBrand() == null ? other.getBrand() == null : this.getBrand().equals(other.getBrand()))
            && (this.getNetcontent() == null ? other.getNetcontent() == null : this.getNetcontent().equals(other.getNetcontent()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
        result = prime * result + ((getCategoryId() == null) ? 0 : getCategoryId().hashCode());
        result = prime * result + ((getInternalCode() == null) ? 0 : getInternalCode().hashCode());
        result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
        result = prime * result + ((getCreateDate() == null) ? 0 : getCreateDate().hashCode());
        result = prime * result + ((getUpdateDate() == null) ? 0 : getUpdateDate().hashCode());
        result = prime * result + ((getDeleted() == null) ? 0 : getDeleted().hashCode());
        result = prime * result + ((getOperatorId() == null) ? 0 : getOperatorId().hashCode());
        result = prime * result + ((getOrganId() == null) ? 0 : getOrganId().hashCode());
        result = prime * result + ((getDescription() == null) ? 0 : getDescription().hashCode());
        result = prime * result + ((getSupplierId() == null) ? 0 : getSupplierId().hashCode());
        result = prime * result + ((getUnitOfMeasure() == null) ? 0 : getUnitOfMeasure().hashCode());
        result = prime * result + ((getWeight() == null) ? 0 : getWeight().hashCode());
        result = prime * result + ((getDimensions() == null) ? 0 : getDimensions().hashCode());
        result = prime * result + ((getImageUrl() == null) ? 0 : getImageUrl().hashCode());
        result = prime * result + ((getImageId() == null) ? 0 : getImageId().hashCode());
        result = prime * result + ((getIsActive() == null) ? 0 : getIsActive().hashCode());
        result = prime * result + ((getQualityTraceFlag() == null) ? 0 : getQualityTraceFlag().hashCode());
        result = prime * result + ((getStandardCompliance() == null) ? 0 : getStandardCompliance().hashCode());
        result = prime * result + ((getAmt() == null) ? 0 : getAmt().hashCode());
        result = prime * result + ((getGrossweight() == null) ? 0 : getGrossweight().hashCode());
        result = prime * result + ((getNetweight() == null) ? 0 : getNetweight().hashCode());
        result = prime * result + ((getWidth() == null) ? 0 : getWidth().hashCode());
        result = prime * result + ((getHeight() == null) ? 0 : getHeight().hashCode());
        result = prime * result + ((getDepth() == null) ? 0 : getDepth().hashCode());
        result = prime * result + ((getOrigincountry() == null) ? 0 : getOrigincountry().hashCode());
        result = prime * result + ((getOriginplace() == null) ? 0 : getOriginplace().hashCode());
        result = prime * result + ((getAssemblycountry() == null) ? 0 : getAssemblycountry().hashCode());
        result = prime * result + ((getCompany() == null) ? 0 : getCompany().hashCode());
        result = prime * result + ((getEname() == null) ? 0 : getEname().hashCode());
        result = prime * result + ((getUnspsc() == null) ? 0 : getUnspsc().hashCode());
        result = prime * result + ((getBrand() == null) ? 0 : getBrand().hashCode());
        result = prime * result + ((getNetcontent() == null) ? 0 : getNetcontent().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", name=").append(name);
        sb.append(", categoryId=").append(categoryId);
        sb.append(", internalCode=").append(internalCode);
        sb.append(", status=").append(status);
        sb.append(", createDate=").append(createDate);
        sb.append(", updateDate=").append(updateDate);
        sb.append(", deleted=").append(deleted);
        sb.append(", operatorId=").append(operatorId);
        sb.append(", organId=").append(organId);
        sb.append(", description=").append(description);
        sb.append(", supplierId=").append(supplierId);
        sb.append(", unitOfMeasure=").append(unitOfMeasure);
        sb.append(", weight=").append(weight);
        sb.append(", dimensions=").append(dimensions);
        sb.append(", imageUrl=").append(imageUrl);
        sb.append(", imageId=").append(imageId);
        sb.append(", isActive=").append(isActive);
        sb.append(", qualityTraceFlag=").append(qualityTraceFlag);
        sb.append(", standardCompliance=").append(standardCompliance);
        sb.append(", amt=").append(amt);
        sb.append(", grossweight=").append(grossweight);
        sb.append(", netweight=").append(netweight);
        sb.append(", width=").append(width);
        sb.append(", height=").append(height);
        sb.append(", depth=").append(depth);
        sb.append(", origincountry=").append(origincountry);
        sb.append(", originplace=").append(originplace);
        sb.append(", assemblycountry=").append(assemblycountry);
        sb.append(", company=").append(company);
        sb.append(", ename=").append(ename);
        sb.append(", unspsc=").append(unspsc);
        sb.append(", brand=").append(brand);
        sb.append(", netcontent=").append(netcontent);
        sb.append("]");
        return sb.toString();
    }
}